package common.zsxmlv.enums;

/**
 * @Author: ZSXM
 * @Description:
 * @Company: DingZheng
 * @Date: Create by 2018/5/24 16:27
 * @Version: 1.0
 * @Modify by:
 */
public enum ResultEnum {

    SUCCESS(0, "请求成功"),

    INSERT_SUCCESS(0, "添加成功"),

    INSERT_ERROR(-1, "添加失败"),

    NOT_FOUND(-1, "没有找到相关数据"),

    NOT_FOUND_DELETE_ERROR(404, "对象不存在,删除失败"),

    NOT_FOUND_UPDATE_ERROR(-1, "对象不存在,更新失败"),

    EXIST_OBJECT(-1, "对象已存在"),

    UPDATE_SUCCESS(1, "更新成功"),

    UPDATE_ERROR(-1, "更新失败"),

    DELETE_SUCCESS(200, "删除成功"),

    DELETE_ERROR(-1, "删除失败"),

    PARAM_ERROR(400, "请求参数有误");

    private Integer code;

    private String msg;

    private ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg(){
        return msg;
    }
}
